#!/usr/bin/perl
use strict;
use warnings;
use Expect;
#use Test::More qw(no_plan);
#$Expect::Log_Stdout = 0;

my $a00=1; my $a01=3; my $a02=3;
my $a10=1; my $a11=4; my $a12=3;
my $a20=1; my $a21=3; my $a22=4;

my $b00=7; my $b01=-3; my $b02=-3;
my $b10=-1; my $b11=1; my $b12=0;
my $b20=-1; my $b21=0; my $b22=1;
my $e = Expect->new;
$e->raw_pty(1);
$e->spawn("./pramatrix_test") or die "Cannot run bc\n";
$e->send("$a00\n");
$e->send("$a01\n");
$e->send("$a02\n");
$e->send("$a10\n");
$e->send("$a11\n");
$e->send("$a12\n");
$e->send("$a20\n");
$e->send("$a21\n");
$e->send("$a22\n");
$e->send("$b00\n");
$e->send("$b01\n");
$e->send("$b02\n");
$e->send("$b10\n");
$e->send("$b11\n");
$e->send("$b12\n");
$e->send("$b20\n");
$e->send("$b21\n");
$e->send("$b22\n");


$e->expect(1, 30) or die "no sum\n";

print "Success\n";

